package com.baiyue.enums;

/**
 * @author 伍波
 * @date 2024/5/16 17:22
 */
public enum ruleTypeEnum {
    TIMEPERIOD(0,"时间段计费"),
    HOUR(1,"小时计费");


    private Integer code;

    private String value;

    ruleTypeEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }
    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static RoleEnum getRuleType(int value) {
        switch (value) {
            case 0:
                return RoleEnum.ADMIN;
            case 1:
                return RoleEnum.BACKEND;
            default:
                return null;
        }
    }
}
